import { createRouter, createWebHistory } from 'vue-router';
import Home from '../views/Home.vue';
// import PetDetails from '../views/PetDetails.vue';
import Login from '../views/Login.vue';
import Register from '../views/Register.vue';
import PetProducts from '@/views/PetProducts.vue';
import PetAdoption from '@/views/PetAdoption.vue';
import PetLost from '@/views/PetLost.vue';
import Forum from '@/views/Forum.vue';
import Profile from '@/views/Profile.vue';
import ShoppingCart from '@/views/ShoppingCart.vue';
import CustomerService from '@/views/CustomerService.vue';
import PetAdoptionRegistration from '@/views/PetAdoptionRegistration.vue'; // 添加导入语句

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  // {
  //   path: '/pet/:id',
  //   name: 'PetDetails',
  //   component: PetDetails
  // },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '/pet-products',
    name: 'PetProducts',
    component: PetProducts
  },
  {
    path: '/pet-adoption',
    name: 'PetAdoption',
    component: PetAdoption
  },
  {
    path: '/pet-lost',
    name: 'PetLost',
    component: PetLost
  },
  {
    path: '/forum',
    name: 'Forum',
    component: Forum
  },
  {
    path: '/profile',
    name: 'Profile',
    component: Profile
  },
  {
    path: '/shopping-cart',
    name: 'ShoppingCart',
    component: ShoppingCart
  },
  {
    path: '/customer-service',
    name: 'CustomerService',
    component: CustomerService
  },
  {
    path: '/Pet-AdoptionRegistration',
    name: 'PetAdoptionRegistration',
    component: PetAdoptionRegistration // 确保这里引用了导入的组件
  }
];

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
});

export default router;